export const getComponentsList = (params) => {
  return http({
    method: "GET",
    url: `/components/list`,
    params,
    prefix: "DESIGNER_URL",
  });
};

export const getComponentsAll = (params) => {
  return http({
    method: "GET",
    url: `/components/all`,
    params,
    prefix: "DESIGNER_URL",
  });
};

export const createComponents = (data) => {
  return http({
    method: "post",
    url: `/components/create`,
    data,
    prefix: "DESIGNER_URL",
  });
};

export const editComponents = (data) => {
  return http({
    method: "put",
    url: `/components/edit`,
    data,
    prefix: "DESIGNER_URL",
  });
};

export const deleteComponents = (data) => {
  return http({
    method: "delete",
    url: `/components/delete/${data._id}`,
    prefix: "DESIGNER_URL",
  });
};
